import { Application } from 'egg';
import * as pageFindPlugin from 'mongoose-paginate';
export default (app: Application) => {
  const mongoose = app.mongoose;
  const schema = new mongoose.Schema({
    result: String,
    content: String,
    msgid: String,
    phone: String,
    ctime: String,
  });
  schema.index({});
  schema.plugin(pageFindPlugin, {});
  return mongoose.model('Smslog', schema, 'smslogs');
};
